<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
</style>

<div ng-if="pagedata.op=='main'" class="fui-page shop-index-page" style="display:block;">
    <div class="fui-header">
        <div class="fui-header-left">
            <!--<a class="back"></a>-->
        </div>
		<div class="title">
        <div class="fui-searchbar bar">
			<div ng-class="{'searchbar center':1,'searchbar-active':pagedata.searchbar ==1}">
						<input id="searchsub" type="button" ng-click="access(pagedata.op,made_query(pagedata.params))"  value="搜索" class="searchbar-cancel searchbtn">
						<div class="search-input" ng-click="pagedata.searchbar =1">
							<input type="search" placeholder="搜索群名称..." class="search" ng-model="pagedata.params.keyword">
						</div>
			</div>
		</div>
		</div>
        <div class="fui-header-right"></div>
    </div>
    <div class="fui-content" style="padding-bottom:4rem">
		<div class="fui-tab-scroll">
			<div class='container type-2'>
				<span ng-class="{'item':1,'on':pagedata.params.type =='wechat'}" ng-click="pagedata.params.type='wechat';tool.get_list('jy_quntui/myqun/getlist/type=wechat',true)">微信群</span>
				<span ng-class="{'item':1,'on':pagedata.params.type =='work'}" ng-click="pagedata.params.type='work';tool.get_list('jy_quntui/myqun/getlist/type=work',true)">企业微信群</span>
			</div>
		</div>
		<div style="padding:0.5rem">
		<div class="fui-list-group" style="margin-top:0">
		<div ng-repeat="item in pagedata.list" class="fui-list" style="height: 3.5rem">
			<div class="fui-list-media">
				<img ng-src="{{tomedia(item.thumb) ||'../core/resource/images/nopic.jpg'}}" class="round">
			</div>
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					 {{item.title}}
				      </div>
				</div>
				<div class="subtitle">
				    <span><i class="icon icon-paihao0"></i> {{item.usernum}}人</span><span style="margin-left:0.5rem">{{item.updatetimetitle}}</span>
				</div>
			</div>
			<div class="row-remark">
				<div ng-click="access_json('jy_quntui/myqun/edit/id='+item.id)" class="jylabel jylabel-success">编辑</div>
				<div ng-click="post({},'del','id='+item.id,'','确认删除吗？')" class="jylabel jylabel-red active">删除</span>
			</div>		
		</div>
		</div>
		</div>
		<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='edit'">
	<div class="fui-header">
			<div class="fui-header-left" onclick="window.history.go(-1);">
				<a class="back"></a>
			</div>
			<div class="title">我的群</div>
			<div class="fui-header-right"></div>
	</div>
	<div class="fui-content">
	<div class="weui_cells weui_cells_form">
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">群名称</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.title" placeholder="请输入您的作品名称">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">群类型</label></div>
					<div class="weui_cell_bd weui_cell_primary" style="width:33%">
								<select ng-model="pagedata.item.type" class="form-control tpl-province">
								<option value="" selected="selected">选类型</option>
								<option value="0" ng-selected="pagedata.item.type==0">普通微信群</option>
								<option value="1" ng-selected="pagedata.item.type==1">企业微信群</option>
								</select>
					</div>
				</div>
	</div>
	<div class="weui_cells_title">群描述</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <textarea class="weui_textarea" ng-model="pagedata.item.desc" placeholder="请用一句话来，代表您群的宣言！" rows="3"></textarea>
                    <div class="weui_textarea_counter">建议68个字以内！</div>
                </div>
            </div>
    </div>
	<div class="weui_cells_title">群图片</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_uploader">
                        <div class="weui_uploader_bd">
                            <ul ng-if="pagedata.item.thumb" class="weui_uploader_files">
                                <li class="weui_uploader_file" style="background-image:url('{{tomedia(pagedata.item.thumb)}}')">
								</li>
                            </ul>
                            <div class="weui_uploader_input_wrp" href="javascript:;" ng-click="image(pagedata.item,'thumb')">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
	<div class="weui_cells_title">群加入二维码</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_uploader">
                        <div class="weui_uploader_bd">
                            <ul ng-if="pagedata.item.ewm" class="weui_uploader_files">
                                <li class="weui_uploader_file" style="background-image:url('{{tomedia(pagedata.item.ewm)}}')">
								</li>
                            </ul>
                            <div class="weui_uploader_input_wrp" href="javascript:;" ng-click="image(pagedata.item,'ewm')">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
	<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.item,'edit')">提交</a>
	</div>
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
if(scope.pagedata.op =='main'){
scope.pagedata.setshowewm=function(item){
	scope.post_json('/index/looklog/id='+item.id,{},function(res){
		if(res=='success'){
			
		}
	});
}
/*var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
if (browserRule.test(navigator.userAgent)) {
        window.onpageshow = function(event) {
            if (event.persisted) {
                window.location.reload()
            }
        };
}*/
//信息弹窗：
//滚动加载
scope.tool.get_list('jy_quntui/myqun/getlist/keyword='+scope.pagedata.params.keyword,true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_quntui/myqun/getlist/keyword='+scope.pagedata.params.keyword);
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
}
</script>